Filter Range Bound Paged Search

ABSTRACT

A filter range based search control to request a range of data from one or more directory servers. A directory server receives a search request from a client application comprising a search filter control defining a set of requested data, a sort control defining a sorting order of the set of requested data, and a range filter control defining a range of entries in the requested data. Data entries matching a search value defined in the search filter control and sorted according to sort attributes defined in the sort control are obtained from a set of directories associated with the directory server to form a sorted list of matching entries. A subset of data entries in the sorted list that match a range value defined in the range filter control are collected, and a response comprising the collected subset of data entries is then sent to the client application.

BACKGROUND OF THE INVENTION

1. Field of the Invention

Embodiments of the present invention relate generally to an improveddata processing system, and in particular to a computer implementedmethod, data processing system, and computer program product for using afilter range based search control in a communication protocol to requesta range of sorted data from one or more directory servers.

2. Description of the Related Art

A directory is a special type of database for managing information aboutpeople, organizations, data processing systems, and other informationsources. Information within a directory is organized within ahierarchical namespace. Each entry in the directory is a named objectand consists of a set of attributes. Each attribute has a definedattribute type and one or more values. Each entry is identified by anunambiguous distinguished name (DN), wherein a distinguished name is aconcatenation of selected attributes from an entry. A directory serviceprovides a mechanism for searching a directory and for retrievinginformation from a directory.

Directory services serve as central repository for searching, adding,deleting and modifying data. Example methods of accessing directoryservices in a computer network include X.500 and Lightweight DirectoryAccess Protocol (LDAP), among others. Lightweight Directory AccessProtocol (LDAP) is a software protocol for enabling a user to locateorganizations, individuals, and other resources such as files anddevices in a network, whether on the Internet or on a corporateIntranet. LDAP is a “lightweight” version of Directory Access Protocol(DAP), which is part of X.500, a standard for directory services in anetwork.

In certain situations, it may be desirable to limit the number of searchitems that are returned to the client from the directory server. Onesuch instance is when the requesting client has limited resources or isconnected to a directory server via a low-bandwidth connection. Inexisting systems, one common method of limiting the number of searchitems returned to the client is through the use of a paged searchresults function. A paged search results function may be used in acommunication protocol to control the rate at which data is returned tothe client from the directory server, such that the client may receive afew entries (a page) at a time rather than receiving all of the searchresults at once. The paged search results function is defined by Requestfor Comments (RFC) 2696 published by the Internet Engineering Task Force(IETF).

BRIEF SUMMARY OF THE INVENTION

Embodiments of the present invention provide a filter range based searchcontrol to request a range of data from one or more directory servers. Adirectory server receives a search request from a client applicationcomprising a search filter control, a sort control and a range filtercontrol. The search filter control defines a set of requested data. Thesort control defines a sorting order of the set of requested data. Therange filter control defines a range of entries in the set of requesteddata. The directory server obtains data entries from a set ofdirectories associated with the directory server. The data entries matcha search value defined in the search filter control, and the matchingdata entries are sorted according to sort attributes defined in the sortcontrol to form a sorted list of matching entries. The directory serverthen collects a subset of data entries in the sorted list of matchingentries, wherein the subset of data entries match a range value definedin the range filter control. The directory server then sends a responsecomprising the collected subset of data entries to the clientapplication.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

FIG. 1 depicts a pictorial representation of a distributed dataprocessing system in which the illustrative embodiments may beimplemented;

FIG. 2 is a block diagram of a typical computer architecture that may beused within a data processing system in which the illustrativeembodiments may be implemented;

FIG. 3 depicts a block diagram that shows an exemplary directoryenvironment for performing a filter range bound paged search inaccordance with the illustrative embodiments;

FIG. 4 depicts a block diagram that shows an exemplary distributeddirectory environment for performing a filter range bound paged searchin accordance with the illustrative embodiments; and

FIG. 5 illustrates a flowchart of a process for using a filter rangebased search control in a communication protocol to perform a pagedsearch of a directory in accordance with the illustrative embodiments.

DETAILED DESCRIPTION OF THE INVENTION

As will be appreciated by one skilled in the art, the present inventionmay be embodied as a system, method or computer program product.Accordingly, the present invention may take the form of an entirelyhardware embodiment, an entirely software embodiment (includingfirmware, resident software, micro-code, etc.) or an embodimentcombining software and hardware aspects that may all generally bereferred to herein as a “circuit,” “module” or “system.” Furthermore,the present invention may take the form of a computer program productembodied in any tangible medium of expression having computer usableprogram code embodied in the medium.

Any combination of one or more computer usable or computer readablemedium(s) may be utilized. The computer-usable or computer-readablemedium may be, for example but not limited to, an electronic, magnetic,optical, electromagnetic, infrared, or semiconductor system, apparatus,device, or propagation medium. More specific examples (a non-exhaustivelist) of the computer-readable medium would include the following: anelectrical connection having one or more wires, a portable computerdiskette, a hard disk, a random access memory (RAM), a read-only memory(ROM), an erasable programmable read-only memory (EPROM or Flashmemory), an optical fiber, a portable compact disc read-only memory(CDROM), an optical storage device, a transmission media such as thosesupporting the Internet or an intranet, or a magnetic storage device.Note that the computer-usable or computer-readable medium could even bepaper or another suitable medium upon which the program is printed, asthe program can be electronically captured, via, for instance, opticalscanning of the paper or other medium, then compiled, interpreted, orotherwise processed in a suitable manner, if necessary, and then storedin a computer memory. In the context of this document, a computer-usableor computer-readable medium may be any medium that can contain, store,communicate, propagate, or transport the program for use by or inconnection with the instruction execution system, apparatus, or device.The computer-usable medium may include a propagated data signal with thecomputer-usable program code embodied therewith, either in baseband oras part of a carrier wave. The computer usable program code may betransmitted using any appropriate medium, including but not limited towireless, wireline, optical fiber cable, RF, etc.

Computer program code for carrying out operations of the presentinvention may be written in any combination of one or more programminglanguages, including an object oriented programming language such asJava, Smalltalk, C++ or the like and conventional procedural programminglanguages, such as the “C” programming language or similar programminglanguages. The program code may execute entirely on the user's computer,partly on the user's computer, as a stand-alone software package, partlyon the user's computer and partly on a remote computer or entirely onthe remote computer or server. In the latter scenario, the remotecomputer may be connected to the user's computer through any type ofnetwork, including a local area network (LAN) or a wide area network(WAN), or the connection may be made to an external computer (forexample, through the Internet using an Internet Service Provider).

The present invention is described below with reference to flowchartillustrations and/or block diagrams of methods, apparatus (systems) andcomputer program products according to embodiments of the invention. Itwill be understood that each block of the flowchart illustrations and/orblock diagrams, and combinations of blocks in the flowchartillustrations and/or block diagrams, can be implemented by computerprogram instructions.

These computer program instructions may be provided to a processor of ageneral purpose computer, special purpose computer, or otherprogrammable data processing apparatus to produce a machine, such thatthe instructions, which execute via the processor of the computer orother programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer program instructions may also bestored in a computer-readable medium that can direct a computer or otherprogrammable data processing apparatus to function in a particularmanner, such that the instructions stored in the computer-readablemedium produce an article of manufacture including instruction meanswhich implement the function/act specified in the flowchart and/or blockdiagram block or blocks.

The computer program instructions may also be loaded onto a computer orother programmable data processing apparatus to cause a series ofoperational steps to be performed on the computer or other programmableapparatus to produce a computer implemented process such that theinstructions which execute on the computer or other programmableapparatus provide processes for implementing the functions/actsspecified in the flowchart and/or block diagram block or blocks.

With reference now to the figures, FIG. 1 depicts a typical network ofdata processing systems, each of which may implement a portion of theillustrative embodiments. Data processing system 100 contains network101, which is a medium that may be used to provide communications linksbetween various devices and computers connected together within dataprocessing system 100. Network 101 may include permanent connections,such as wire or fiber optic cables, or temporary connections madethrough telephone or wireless communications. In the depicted example,server 102 and server 103 are connected to network 101 along withstorage unit 104. In addition, clients 105-107 also are connected tonetwork 101. Clients 105-107 and servers 102-103 may be represented by avariety of computing devices, such as mainframes, personal computers,personal digital assistants (PDAs), and the like. Data processing system100 may include additional servers, clients, routers, other devices, andpeer-to-peer architectures that are not shown.

In the depicted example, data processing system 100 may include theInternet with network 101 representing a worldwide collection ofnetworks and gateways that use various protocols to communicate with oneanother, such as Lightweight Directory Access Protocol (LDAP), TransportControl Protocol/Internet Protocol (TCP/IP), File Transfer Protocol(FTP), Hypertext Transport Protocol (HTTP), Wireless ApplicationProtocol (WAP), and so on. Of course, data processing system 100 mayalso include a number of different types of networks, such as, forexample, an intranet, a local area network (LAN), or a wide area network(WAN). For example, server 102 directly supports client 109 and network110, which incorporates wireless communication links. Network-enabledphone 111 connects to network 110 through wireless link 112, and PDA 113connects to network 110 through wireless link 114. Phone 111 and PDA 113can also directly transfer data between themselves across wireless link115 using an appropriate technology, such as Bluetooth wirelesstechnology, to create so-called personal area networks (PAN) or personalad-hoc networks. In a similar manner, PDA 113 can transfer data to PDA107 via wireless communication link 116.

The illustrative embodiments may be implemented on a variety of hardwareplatforms; FIG. 1 is intended as an example of a heterogeneous computingenvironment and not as an architectural limitation for the illustrativeembodiments.

With reference now to FIG. 2, a block diagram of a data processingsystem is shown in which illustrative embodiments may be implemented.Data processing system 200 is an example of a computer, such as server103 or client 105 in FIG. 1, in which computer usable program code orinstructions implementing the processes may be located for theillustrative embodiments. In this illustrative example, data processingsystem 200 includes communications fabric 202, which providescommunications between processor unit 204, memory 206, persistentstorage 208, communications unit 210, input/output (I/O) unit 212, anddisplay 214.

Processor unit 204 serves to execute instructions for software that maybe loaded into memory 206. Processor unit 204 may be a set of one ormore processors or may be a multi-processor core, depending on theparticular implementation. Further, processor unit 204 may beimplemented using one or more heterogeneous processor systems in which amain processor is present with secondary processors on a single chip. Asanother illustrative example, processor unit 204 may be a symmetricmulti-processor system containing multiple processors of the same type.

Memory 206 and persistent storage 208 are examples of storage devices. Astorage device is any piece of hardware that is capable of storinginformation either on a temporary basis and/or a permanent basis. Memory206, in these examples, may be, for example, a random access memory orany other suitable volatile or non-volatile storage device. Persistentstorage 208 may take various forms depending on the particularimplementation. For example, persistent storage 208 may contain one ormore components or devices. For example, persistent storage 208 may be ahard drive, a flash memory, a rewritable optical disk, a rewritablemagnetic tape, or some combination of the above. The media used bypersistent storage 208 also may be removable. For example, a removablehard drive may be used for persistent storage 208.

Communications unit 210, in these examples, provides for communicationswith other data processing systems or devices. In these examples,communications unit 210 is a network interface card. Communications unit210 may provide communications through the use of either or bothphysical and wireless communications links.

Input/output unit 212 allows for input and output of data with otherdevices that may be connected to data processing system 200. Forexample, input/output unit 212 may provide a connection for user inputthrough a keyboard and mouse. Further, input/output unit 212 may sendoutput to a printer. Display 214 provides a mechanism to displayinformation to a user.

Instructions for the operating system and applications or programs arelocated on persistent storage 208. These instructions may be loaded intomemory 206 for execution by processor unit 204. The processes of thedifferent embodiments may be performed by processor unit 204 usingcomputer implemented instructions, which may be located in a memory,such as memory 206. These instructions are referred to as program code,computer usable program code, or computer readable program code that maybe read and executed by a processor in processor unit 204. The programcode in the different embodiments may be embodied on different physicalor tangible computer readable media, such as memory 206 or persistentstorage 208.

Program code 216 is located in a functional form on computer readablemedia 218 that is selectively removable and may be loaded onto ortransferred to data processing system 200 for execution by processorunit 204. Program code 216 and computer readable media 218 form computerprogram product 220 in these examples. In one example, computer readablemedia 218 may be in a tangible form, such as, for example, an optical ormagnetic disc that is inserted or placed into a drive or other devicethat is part of persistent storage 208 for transfer onto a storagedevice, such as a hard drive that is part of persistent storage 208. Ina tangible form, computer readable media 218 also may take the form of apersistent storage, such as a hard drive, a thumb drive, or a flashmemory that is connected to data processing system 200. The tangibleform of computer readable media 218 is also referred to as computerrecordable storage media. In some instances, computer recordable media218 may not be removable.

Alternatively, program code 216 may be transferred to data processingsystem 200 from computer readable media 218 through a communicationslink to communications unit 210 and/or through a connection toinput/output unit 212. The communications link and/or the connection maybe physical or wireless in the illustrative examples. The computerreadable media also may take the form of non-tangible media, such ascommunications links or wireless transmissions containing the programcode.

In some illustrative embodiments, program code 216 may be downloadedover a network to persistent storage 208 from another device or dataprocessing system for use within data processing system 200. Forinstance, program code stored in a computer readable storage medium in aserver data processing system may be downloaded over a network from theserver to data processing system 200. The data processing systemproviding program code 216 may be a server computer, a client computer,or some other device capable of storing and transmitting program code216.

The different components illustrated for data processing system 200 arenot meant to provide architectural limitations to the manner in whichdifferent embodiments may be implemented. The different illustrativeembodiments may be implemented in a data processing system includingcomponents in addition to or in place of those illustrated for dataprocessing system 200. Other components shown in FIG. 2 can be variedfrom the illustrative examples shown.

The different embodiments may be implemented using any hardware deviceor system capable of executing program code. As one example, the dataprocessing system may include inorganic components integrated withorganic components and/or may be comprised entirely of organiccomponents excluding a human being. For example, a storage device may becomprised of an organic semiconductor. As another example, a storagedevice in data processing system 200 is any hardware apparatus that maystore data. Memory 206, persistent storage 208, and computer readablemedia 218 are examples of storage devices in a tangible form.

In another example, a bus system may be used to implement communicationsfabric 202 and may be comprised of one or more buses, such as a systembus or an input/output bus. Of course, the bus system may be implementedusing any suitable type of architecture that provides for a transfer ofdata between different components or devices attached to the bus system.Additionally, a communications unit may include one or more devices usedto transmit and receive data, such as a modem or a network adapter.Further, a memory may be, for example, memory 206 or a cache such asfound in an interface and memory controller hub that may be present incommunications fabric 202.

Those of ordinary skill in the art will appreciate that the hardware inFIG. 2 may vary depending on the system implementation. For example, thesystem may have one or more processors, such as an Intel® Pentium®-based processor and a digital signal processor (DSP), and one or moretypes of volatile and non-volatile memory. Other peripheral devices maybe used in addition to or in place of the hardware depicted in FIG. 2.The depicted examples are not meant to imply architectural limitationswith respect to the illustrative embodiments.

In addition to being able to be implemented on a variety of hardwareplatforms, the illustrative embodiments may be implemented in a varietyof software environments. A typical operating system may be used tocontrol program execution within each data processing system. Forexample, one device may run a UNIX operating system, while anotherdevice contains a simple Java runtime environment. A representativecomputer platform may include a browser, which is a well known softwareapplication for accessing hypertext documents in a variety of formats,such as graphic files, word processing files, Extensible Markup Language(XML), Hypertext Markup Language (HTML), Handheld Device Markup Language(HDML), Wireless Markup Language (WML), and various other formats andtypes of files.

The illustrative embodiments may be implemented on a variety of hardwareand software platforms, as described above with respect to FIG. 1 andFIG. 2. The descriptions of the figures herein may involve certainactions by either a client device or a user of the client device. One ofordinary skill in the art would understand that responses and/orrequests to/from the client are sometimes initiated by a user and atother times are initiated automatically by a client, often on behalf ofa user of the client. Thus, when a client or a user of a client ismentioned in the description of the figures, it should be understoodthat the terms “client” and “user” can be used interchangeably withoutsignificantly affecting the meaning of the described processes.

The descriptions of the figures herein may involve an exchange ofinformation between various components, and the exchange of informationmay be described as being implemented via an exchange of messages, e.g.,a request message followed by a response message. It should be notedthat an exchange of information between computational components, whichmay include a synchronous or asynchronous request/response exchange, maybe implemented equivalently via a variety of data exchange mechanisms,such as messages, method calls, remote procedure calls, event signaling,or other mechanism.

As previously mentioned, a paged search results function is often usedin a communication protocol to control the rate at which search resultsare returned to the client from the directory server. In a paged search,a client request specifies the number of entries that should be returnedat a time. While the paged search provides a basic method of limitingthe dataset returned from the directory server to the requesting clientapplication, the paged search does not provide enough flexibility insituations in which a client application needs to request differentsubsets of data from a directory server. For instance, the clientapplication may need to request a subset of data from the directoryserver that falls within a certain range, and then subsequently requestanother subset of the data within another range using the same originalsearch filter. In a particular example, the client application wants toobtain the names of persons in the directory who have the first name‘John’. Using representations within the LDAP communications protocol inthis example, the search request may comprise a search request of allnames within an organization that are sorted using a sort control bysurname (SN) and a search filter by common name (CN), where CN=John.Within the first sorted search request, the client application wants tolimit the data returned by sending a request for all matching entries(where CN=John) within a particular surname range (e.g., SN>=A andSN<=B) and sorted by SN. Within a subsequent sorted search request, theclient application wants to request all matching entries (where CN=John)within another surname range (e.g., SN>=C and SN<=D) and sorted by SN.One existing approach to perform such sorted search requests is toenable the client application to concatenate the desired surname rangeonto the original search filter to form an extended search filter. Inother words, the first filtered sorted search request would comprise theextended search filter CN=John && SN>=A && SN<=B, while the subsequentsorted search request would comprise the extended search filter CN=John&& SN>=C && SN<=D. However, a drawback to this existing approach is thatthe concatenation functionality adds complexity to the clientapplication, as well as additional filter resolution and sorting work onthe side of the directory server that is evaluating the search request.The directory server is required to evaluate all of the data in thedirectory datastore every time a search request is received from theclient application.

Another existing approach to perform such sorted search requests is tohave the client application perform a sorted search with the searchfilter (e.g., CN=John) and request a specific page size (e.g., 15). Theclient application will filter through the matching results as they arereturned from the directory server to identify the entries that matchthe surname filter SN>=A && SN<=B for the first request, and the surnamefilter SN>=C && SN<=D for the second request. This existing approachalso contains drawbacks in that the burden is placed on the endapplication to perform at least a portion of the filtering process.There is also the possibility of the client application having toperform multiple search requests in order for the client application toobtain the desired range of data, as well as the possibility that moredata may be returned by a search request than is actually needed by theclient application.

The illustrative embodiments provide a solution to the problems above byproviding a filter range based search control to request a range of datafrom a set of directory servers, wherein a set includes one or moreservers. The filter range based search control may be used in acommunication protocol (e.g., in a client application's search requestand a directory server's search result response) to enable a clientapplication to limit and control the search results that are returned tothe requesting application. Rather than simply limiting the number ofmatching entries returned to the requesting client application as inexisting paged search methods, the filter range based search controlallows for limiting the search entries that a directory server returnsto the client application by a specific filter range value.

The client application sends a request for data in a sorted format to adirectory server. The request may contain a set of attributes and asearch filter that defines the data desired by the client application.For example, the request may comprise a search filter control (f) forobtaining the names of all employees in a company who have the firstname “John”. The request also comprises a sort control (k) specifyinghow the client wants the returned data to be formatted, such as sortedin ascending or descending alphabetical or numerical order. The requestfurther comprises a search range filter control (r) that is separatefrom the search filter (f) and that defines the range of sorted datadesired by the client application. In order to use the range filtercontrol in a search request, the sort control is also required to beincluded in the request. The attribute specified in the sort control isused to first determine the way the matching data entries should besorted, and the range filter is then applied to the sorted entries tocollect the desired data range. The range filter control uses the sameattribute (e.g., SN) used in the sort control to filter the matchingentries, but the range filter control specifies a value associated withthe attribute (e.g., SN<=B). Thus, the client request comprises a searchfilter control, a sort key control, and a search range filter controlwhich is provided to the directory server. In response to receiving thesearch request from the client application, the directory server returnsthe sorted entries matching the search filter that fall within the rangeof sorted data defined by search filter range control to the clientapplication.

While the illustrative embodiments may be employed to obtain a range ofdata from a single directory server, the filter range based searchcontrol is also useful in situations where a client application islocated in front of a plurality of directory servers that holddistributed data, and the directory servers need to return the requesteddata to the client application in a sorted fashion according to the sortkey in the request. In a distributed directory environment, data ispartitioned across multiple directory servers, also known as backendservers. Since each of the distributed directory servers can onlyperform a local sort of data, the client application is required tocollect all of the matching entries from the distributed servers andperform a sort of the collected entries. The filter range based searchcontrol enables the client application to request ranges of data fromthe distributed directory servers, and thus allows the clientapplication to more easily perform sorting of the data returned fromeach distributed server since only a particular set of data is returnedfrom each server using the filter range based search control. If theclient application sends multiple requests comprising different searchfilter ranges to the distributed servers, the client application may usesort key (k) to perform a sort of all of the search entries returned bydistributed servers.

The illustrative embodiments may be implemented using a variety ofdirectory implementation schemes and protocols, including, among others,X.500 directories and Lightweight Directory Access Protocol (LDAP)operations. FIGS. 3-4 illustrate example directory environments in whichthe illustrative embodiments may be implemented. In FIG. 3, a blockdiagram is depicted that shows an exemplary directory environment 300for performing a filter range bound paged search in accordance with theillustrative embodiments. User 302 operates client application 304,which may execute on a client device such as client 105 shown in FIG. 1.Client application 304 interacts with directory server 306, such asserver 103 shown in FIG. 1. Directory server 306 supports functionalityfor accessing a datastore that contains a directory, shown as directorydatastore 308. A typical directory datastore is a relational databasemanagement (RDBM) server.

In this illustrative example, client application 304 sends a sortedsearch request 310 to backend directory server 306. Sorted searchrequest 310 comprises a search filter and a particular sort key for thesearch. The sort key specifies a combination of sort attribute and sortorder of the attribute (i.e., ascending or descending). If user 302wants the names of all employees in alphabetical order, the searchfilter in such a request may be used to identify and return the names ofall the employees in the company, and the sort attribute and preferredsort order of the returned data is specified as sorted by surname (SN)in alphabetical order. Directory server 306 obtains the requested datafrom directory datastore 308. Directory server 306 may retrieve the datafrom directory datastore 308 in a sorted order, thereby saving sortingefforts at the directory server application level. Alternatively, dataentries matching the search filter obtained from directory datastore 308may be sorted at directory server 306 based on the sort key from theclient to form a complete sorted list of matching data entries.

Once directory server 306 obtains sorted data entries matching thesearch filter, directory server 306 then applies the range filter 316specified in the search request to the complete sorted list of matchingdata entries. The range filter control in the search request comprises arange filter that specifies a same attribute (e.g., SN) that is used inthe sort control to sort the entries matching the search filter. Therange filter control also comprises a range filter value associated withthe attribute that specifies the desired range of the attribute tofilter the matching entries (e.g., SN<=B). Only those entries in thecomplete sorted list of matching data entries that match the specifiedrequested range value will be returned in the response to clientapplication 304. Thus, the range filter control in the search requestmay be used to limit the data returned to the client application byspecifying a desired range of matching entries to be returned by thedirectory server in the search response, rather than by specifying thenumber of matching entries that should be returned by the server asperformed in a page search request.

A cookie may be passed between client application 304 and directoryserver 306 to track the current connection of the client application andthe directory server and inform the directory server that a searchrequest is a continuation of the previous request. A search request is acontinuation of a previous search request if the search requestcomprises the same search filter value and the same sort key as theprevious search request, but a different range filter value. The cookieassociates the current search with a previous search. The presence ofthe cookie in the search request informs the directory server that thecurrent request is a continuation of the previous search request. Thedirectory server may also perform a sanity check on the associatedcookie. The sanity check validates that the current request is acontinuation of the previous search request by determining thatparameters contained in the cookie match the other parameters of theprevious search. Directory server 306 includes the cookie when providingsearch results response 320 to client application 304. Clientapplication 304 may include the cookie in a subsequent search request todirectory server 306 to inform directory server 306 that the currentrequest is a continuation of the previous request.

When directory server 306 detects the cookie in the current request,directory server 306 uses the complete sorted list of matching dataentries obtained when processing the previous request to process thecurrent request. Directory server 306 may use the complete sorted listof all matching entries collected from the previous request since thesearch filter and sort key in the current request are the same as thesearch filter and sort key in the previous request. Consequently,directory server 306 does not need to re-search the directory datastorefor entries matching the search filter. Directory server 306 applies thenew range filter specified in the current request to the complete sortedlist to collect the entries in the sorted list that match the new rangefilter value, but which also are located in the sorted list after theentries specified in the previous range filter value. The entriesspecified in the previous range filter value have already been returnedto client application 304, so these entries are omitted from the currentresult set. In this manner, directory server 306 may reduce processingtime by reusing the complete sorted list of matching entries obtainedwhen processing the previous request and collecting the entries in thesorted list that match the new range filter, while excluding the entriesreturned in the previous search results. Directory server 306 thenprovides the sorted search results response comprising the new desiredrange of entries to client application 304.

A specific application of the filter range bound paged search may bedescribed using the previously mentioned example in which a user wantsto obtain the names of employees in a company who have the first name“John” (e.g., CN=John). In this example, the user also wants to limitthe amount of data returned by the search, and uses the range filtercontrol in the sorted search request to request only those matchingentries where the last name falls within a particular range, such asSN>=A through SN<=C. Upon receiving the request, directory server 306obtains all sorted entries in directory datastore 308 that match thesearch filter CN=John to form a complete sorted list of all of thematching entries. The sorted matching data entries are represented forpurposes of illustration in FIG. 3 as result list 314 (SN=A to SN=Z inthis example). Directory server 306 then applies the range filterspecified in the request to the sorted list of matching entries tocollect only those entries that match the values specified in the rangefilter. For example, if the range filter value specified is a surnamefilter SN>=A through SN<=C, directory server 306 will collect only thematching entries that have a surname that begins with A, B, or C andwill provide a response comprising these entries and a cookie to clientapplication 304. The filtered range of sorted matching data entries arerepresented for purposes of illustration as filtered result list 318which shows an example of entries matching the range filter value ofSN>=A through SN<=C.

In a subsequent search request, the user wants to request matchingentries where the last name falls within a different range. Clientapplication 304 sends a search request comprising the cookie and a newrange filter, e.g., SN<=E, to directory server 306. Since all theentries in the complete sorted list of matching entries where SN<=C werealready returned in the previous response to client application 304,directory server 306 only needs to collect the entries in the completesorted list of matching entries that match the current range filtervalue, while excluding the entries matching the last range filter value.Thus, in this example, directory server 306 will provide a responsecomprising the sorted entries having a surname that begins with D and E(and an associated cookie) to client application 304.

FIG. 4 depicts a block diagram that shows an exemplary distributeddirectory environment for performing a filter range bound paged searchin accordance with the illustrative embodiments. Distributed directoryenvironment 400 may include multiple directory servers that interoperatewithin a same distributed data processing environment as clientapplication 404, e.g., in a manner similar to the distributed dataprocessing environment shown in FIG. 1.

In distributed directory environment 400, user 402 operates clientapplication 404, which may execute on a client device such as client 105shown in FIG. 1. Distributed directory servers 406-410 supportfunctionality for accessing datastores that contain portions of adistributed directory, i.e. portions of a directory information tree,shown as distributed directory datastores 412-416. Data entries that areof interest to a particular directory operation may reside in differentportions of a distributed directory that are supported on differentsystems.

Like directory environment 300 in FIG. 3, client application 404 indistributed directory environment 400 sends a sorted search requestcomprising a search filter control, a sort control, and a range filtercontrol. However, as a distributed directory is a directory environmentin which data is partitioned across multiple directory servers, clientapplication 404 in distributed directory environment 400 sends thesearch request to each of distributed directory servers 406-410. Each ofdistributed directory servers 406-410 obtains the data entries matchingthe search filter in the request in a sorted order according to the sortkey value in the request from its respective datastore 412-416, and thenapplies the range filter specified in the request to its sorted list ofdata entries matching the search filter. Each of distributed directoryservers 406-410 then provides the data entries matching the range filtervalue to client application 404. Since each of distributed directoryservers 406-410 may only perform a local sort of data, clientapplication 404 performs a sort of all of the data entries matching therange filter value received from distributed directory servers 406-410to generate a sorted list of all matching data entries in distributeddirectory environment 400 that fall within the specific range filterspecified in the search request.

In an alternative embodiment, the distributed directory environment mayinclude a proxy server that acts as an intermediate agent between clientapplication 404 and distributed directory servers 406-410. Clientapplication 404 may bind to the proxy server instead of directly bindingto the backend servers. Client application 404 may send a search requestcomprising a search filter control, a sort control, and a search filterrange control to the proxy server. The proxy server sends the request tothe distributed directory servers 406-410, which return search entriesmatching the attributes in the search request. If client application 404sends multiple requests comprising different search filter ranges to theproxy server, the proxy server may use sort key to perform the sortingof all of the range filtered data returned from distributed directoryservers 406-410. The proxy then forwards the sorted range filtered datato client application 404.

FIG. 5 illustrates a flowchart of a process for using a filter rangebased search control in a communication protocol to perform a pagedsearch of a directory in accordance with the illustrative embodiments.The process described in FIG. 5 may be implemented in a data processingenvironment such as depicted in FIG. 3.

The process begins with a client application in the data processingenvironment connecting to a directory server (step 502). The clientapplication then generates a search request for a range of data storedat the directory server (step 504). The client request may comprise asearch filter control for defining the desired data, a sort control fordefining the desired sort order of the returned data, a range filtercontrol for defining the desired range of entries in all of the datathat matched the search filter. The client application then sends thesearch request comprising the range filter control to the directoryserver(s) that contains the requested data (step 506).

When a directory server receives the search request, the directoryserver determines if the current search request is a continuation of theprevious request (step 508). The directory server may determine that thecurrent search request is a continuation of the previous request if thedirectory server locates a cookie in the request. The presence of thecookie indicates to the directory server that the current search requestis a continuation of the previous request.

If the current search request is not a continuation of the previousrequest (“no” output of step 508), the directory server handles therequest as an initial search request. The directory server performs asorted search of the directory to locate all entries matching the searchfilter specified in the request and sorted according to the sort controlspecified in the request (step 510). At this point, the directory serverhas a complete sorted list of all entries matching the search filtercriteria. The directory server then applies the filter range basedsearch control specified in the request to the sorted list of matchingentries to collect the particular entries in the sorted list that matchthe range filter value specified in the request (step 512). Thedirectory server then sends a search results response comprising thecollected range of sorted matching entries to the client application(step 514). The search results message also includes an associatedcookie.

Turning back to step 508, if the current search request is acontinuation of the previous request (“yes” output of step 508), thedirectory server handles the current request as a subsequent searchrequest from the client application. Since the search filter and sortkey in the current request are the same as the search filter and sortkey in the previous request, the directory server uses the completesorted list of all entries matching the search filter criteria ascollected in processing the previous request to process the currentsearch request, and applies the new range filter specified in thecurrent request to the sorted list (step 516). The directory server thencollects the entries in the sorted list that match the range filtervalue in the current request and that are located in the sorted listafter the entries that match the range filter value in the previousrequest (step 518). Thus, the directory server collects the entries inthe sorted list that match the new range filter, while excluding theentries that were returned in the previous search results. The directoryserver then sends a search results response comprising the collectedrange of sorted matching entries to the client application (step 520).

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof code, which comprises one or more executable instructions forimplementing the specified logical function(s). It should also be notedthat, in some alternative implementations, the functions noted in theblock may occur out of the order noted in the figures. For example, twoblocks shown in succession may, in fact, be executed substantiallyconcurrently, or the blocks may sometimes be executed in the reverseorder, depending upon the functionality involved. It will also be notedthat each block of the block diagrams and/or flowchart illustration, andcombinations of blocks in the block diagrams and/or flowchartillustration, can be implemented by special purpose hardware-basedsystems that perform the specified functions or acts, or combinations ofspecial purpose hardware and computer instructions.

The terminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting of the invention. Asused herein, the singular forms “a”, and “the” are intended to includethe plural forms as well, unless the context clearly indicatesotherwise. It will be further understood that the terms “comprises”and/or “comprising,” when used in this specification, specify thepresence of stated features, integers, steps, operations, elements,and/or components, but do not preclude the presence or addition of oneor more other features, integers, steps, operations, elements,components, and/or groups thereof.

The corresponding structures, materials, acts, and equivalents of allmeans or step plus function elements in the claims below are intended toinclude any structure, material, or act for performing the function incombination with other claimed elements as specifically claimed. Thedescription of the present invention has been presented for purposes ofillustration and description, but is not intended to be exhaustive orlimited to the invention in the form disclosed. Many modifications andvariations will be apparent to those of ordinary skill in the artwithout departing from the scope and spirit of the invention. Theembodiment was chosen and described in order to best explain theprinciples of the invention and the practical application, and to enableothers of ordinary skill in the art to understand the invention forvarious embodiments with various modifications as are suited to theparticular use contemplated.

The invention can take the form of an entirely hardware embodiment, anentirely software embodiment or an embodiment containing both hardwareand software elements. In a preferred embodiment, the invention isimplemented in software, which includes but is not limited to firmware,resident software, microcode, etc.

Furthermore, the invention can take the form of a computer programproduct accessible from a computer-usable or computer-readable mediumproviding program code for use by or in connection with a computer orany instruction execution system. For the purposes of this description,a computer-usable or computer readable medium can be any tangibleapparatus that can contain, store, communicate, propagate, or transportthe program for use by or in connection with the instruction executionsystem, apparatus, or device.

The medium can be an electronic, magnetic, optical, electromagnetic,infrared, or semiconductor system (or apparatus or device) or apropagation medium. Examples of a computer-readable medium include asemiconductor or solid state memory, magnetic tape, a removable computerdiskette, a random access memory (RAM), a read-only memory (ROM), arigid magnetic disk and an optical disk. Current examples of opticaldisks include compact disk—read only memory (CD-ROM), compactdisk—read/write (CD-R/W) and DVD.

The invention can also take the form of a computer program product whichhas been downloaded over a network from one device to another for use inthe other device. For instance, the program code stored in a computerreadable storage medium in a server data processing system may bedownloaded over a network from the server to a remote data processingsystem, such as a client or another server. Likewise, the program codestored in a computer readable storage medium in a client data processingsystem may be downloaded over a network from the client to a remote dataprocessing system, such as a server or another client.

A data processing system suitable for storing and/or executing programcode will include at least one processor coupled directly or indirectlyto memory elements through a system bus. The memory elements can includelocal memory employed during actual execution of the program code, bulkstorage, and cache memories which provide temporary storage of at leastsome program code in order to reduce the number of times code must beretrieved from bulk storage during execution.

Input/output or I/O devices (including but not limited to keyboards,displays, pointing devices, etc.) can be coupled to the system eitherdirectly or through intervening I/O controllers.

Network adapters may also be coupled to the system to enable the dataprocessing system to become coupled to other data processing systems orremote printers or storage devices through intervening private or publicnetworks. Modems, cable modem and Ethernet cards are just a few of thecurrently available types of network adapters.

The description of the present invention has been presented for purposesof illustration and description, and is not intended to be exhaustive orlimited to the invention in the form disclosed. Many modifications andvariations will be apparent to those of ordinary skill in the art. Theembodiment was chosen and described in order to best explain theprinciples of the invention, the practical application, and to enableothers of ordinary skill in the art to understand the invention forvarious embodiments with various modifications as are suited to theparticular use contemplated.

1. A computer implemented method for performing a filtered search in adirectory environment, the computer implemented method comprising:receiving, at a directory server, a search request from a clientapplication comprising a search filter control, a sort control and arange filter control, wherein the search filter control defines a set ofrequested data, wherein the sort control defines a sorting order of theset of requested data, and wherein the range filter control defines arange of entries in the set of requested data; obtaining data entriesfrom a set of directories associated with the directory server, whereinthe data entries match a search value defined in the search filtercontrol, and wherein the matching data entries are sorted according tosort attributes defined in the sort control to form a sorted list ofmatching entries; collecting a subset of data entries in the sorted listof matching entries, wherein the subset of data entries match a rangevalue defined in the range filter control; and sending a responsecomprising the collected subset of data entries to the clientapplication.
 2. The computer implemented method of claim 1, furthercomprising: receiving, at the directory server, a subsequent searchrequest from the client application, wherein the subsequent searchrequest comprises a same search filter control and a same sort controlas the search request, and wherein the subsequent search requestcomprises a new range filter control; determining that the subsequentsearch request is a continuation of the search request from the clientapplication; collecting a second subset of data entries in the sortedlist of matching entries, wherein the second subset of data entriesmatch a new range value defined in the new range filter control; andsending a second response comprising the collected second subset of dataentries to the client application.
 3. The computer implemented method ofclaim 2, wherein collecting a second subset of data entries in thesorted list of matching entries further comprises collecting onlyentries in the sorted list that match the new range value defined in thenew range filter control and are located in the sorted list after therange value defined in the range filter control.
 4. The computerimplemented method of claim 1, wherein sending a response comprising thecollected subset of data entries to the client application furthercomprises including a cookie in the response to the client application.5. (canceled)
 6. The computer implemented method of claim 1, furthercomprising: responsive to receiving, at the client application,responses comprising collected subsets of data entries from a pluralityof directory servers, sorting the collected subsets of data entries atthe client application according to the sort key defined in the sortcontrol.
 7. The computer implemented method of claim 1, wherein therange filter control defines a same attribute as the sort attributedefined in the sort control, and wherein the range filter controlspecifies a value for the attribute.
 8. A data processing system forperforming a filtered search in a directory environment, the dataprocessing system for comprising: a bus; a storage device connected tothe bus, wherein the storage device contains computer usable code; atleast one managed device connected to the bus; a communications unitconnected to the bus; and a processing unit connected to the bus,wherein the processing unit executes the computer usable code toreceive, at a directory server, a search request from a clientapplication comprising a search filter control, a sort control and arange filter control, wherein the search filter control defines a set ofrequested data, wherein the sort control defines a sorting order of theset of requested data, and wherein the range filter control defines arange of entries in the set of requested data; obtain data entries froma set of directories associated with the directory server, wherein thedata entries match a search value defined in the search filter control,and wherein the matching data entries are sorted according to sortattributes defined in the sort control to form a sorted list of matchingentries; collect a subset of data entries in the sorted list of matchingentries, wherein the subset of data entries match a range value definedin the range filter control; and send a response comprising thecollected subset of data entries to the client application.
 9. The dataprocessing system of claim 8, wherein the processing unit furtherexecutes the computer usable code to receive, at the directory server, asubsequent search request from the client application, wherein thesubsequent search request comprises a same search filter control and asame sort control as the search request, and wherein the subsequentsearch request comprises a new range filter control; determine that thesubsequent search request is a continuation of the search request fromthe client application; collect a second subset of data entries in thesorted list of matching entries, wherein the second subset of dataentries match a new range value defined in the new range filter control;and send a second response comprising the collected second subset ofdata entries to the client application.
 10. The data processing systemof claim 9, wherein the computer usable code to collect a second subsetof data entries in the sorted list of matching entries further comprisescomputer usable code to collect only entries in the sorted list thatmatch the new range value defined in the new range filter control andare located in the sorted list after the range value defined in therange filter control.
 11. The data processing system of claim 8, whereinthe computer usable code to send a response comprising the collectedsubset of data entries to the client application further comprisesincluding a cookie in the response to the client application, andwherein the client application includes the cookie in the subsequentsearch request to indicate to the directory server that the subsequentsearch request is a continuation of the search request.
 12. A computerprogram product for performing a filtered search in a directoryenvironment, the computer program product comprising: a tangiblecomputer usable storage medium having computer usable program codetangibly stored thereon, the computer usable program code comprising:computer usable program code for receiving, at a directory server, asearch request from a client application comprising a search filtercontrol, a sort control and a range filter control, wherein the searchfilter control defines a set of requested data, wherein the sort controldefines a sorting order of the set of requested data, and wherein therange filter control defines a range of entries in the set of requesteddata; computer usable program code for obtaining data entries from a setof directories associated with the directory server, wherein the dataentries match a search value defined in the search filter control, andwherein the matching data entries are sorted according to sortattributes defined in the sort control to form a sorted list of matchingentries; computer usable program code for collecting a subset of dataentries in the sorted list of matching entries, wherein the subset ofdata entries match a range value defined in the range filter control;and computer usable program code for sending a response comprising thecollected subset of data entries to the client application.
 13. Thecomputer program product of claim 12, further comprising: computerusable program code for receiving, at the directory server, a subsequentsearch request from the client application, wherein the subsequentsearch request comprises a same search filter control and a same sortcontrol as the search request, and wherein the subsequent search requestcomprises a new range filter control; computer usable program code fordetermining that the subsequent search request is a continuation of thesearch request from the client application; computer usable program codefor collecting a second subset of data entries in the sorted list ofmatching entries, wherein the second subset of data entries match a newrange value defined in the new range filter control; and computer usableprogram code for sending a second response comprising the collectedsecond subset of data entries to the client application.
 14. Thecomputer program product of claim 13, wherein the computer usableprogram code for collecting a second subset of data entries in thesorted list of matching entries further comprises computer usableprogram code for collecting only entries in the sorted list that matchthe new range value defined in the new range filter control and arelocated in the sorted list after the range value defined in the rangefilter control.
 15. The computer program product of claim 12, whereinthe computer usable program code for sending a response comprising thecollected subset of data entries to the client application furthercomprises including a cookie in the response to the client application.16. (canceled)
 17. The computer program product of claim 12, furthercomprising: computer usable program code for sorting the collectedsubsets of data entries at the client application according to the sortkey defined in the sort control in response to receiving, at the clientapplication, responses comprising collected subset of data entries froma plurality of directory servers.
 18. The computer program product ofclaim 12, wherein the range filter control defines a same attribute asthe sort attribute defined in the sort control, and wherein the rangefilter control specifies a value for the attribute.
 19. The computerprogram product of claim 12, wherein the computer usable program code isstored in a computer readable storage medium in a data processingsystem, and wherein the computer usable program code is downloaded overa network from a remote data processing system.
 20. The computer programproduct of claim 12, wherein the computer usable program code is storedin a computer readable storage medium in a server data processingsystem, and wherein the computer usable program code is downloaded overa network from a remote data processing system for use in a computerreadable storage medium with the remote system.